﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wfCmfInnerPayPwd.aspx.cs" Inherits="msBsc.WebUi.wMall.Buyer.wfCmfInnerPayPwd" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="/themes/wStyle1/css/sLayout.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/sHead.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/sFoot.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/Seller/sDjackInfo.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/Buyer/sTouristInfo.css" rel="stylesheet" />

    <link href="/themes/wStyle1/css/usermenu.css" rel="stylesheet" />
    <title>支付验证</title>
    <style>
        input[type=password], input[type=text] {
            border: 0;
            border: 1px solid #808080;
            width: 300px;
            height: 30px;
            line-height: 30px;
        }

            input[type=password]:hover {
                border: 1px solid #0094ff;
            }

        input[type=button] {
            width: 80px;
            height: 28px;
            text-align: center;
            line-height: 28px;
            border: 0;
            background-color: #7abd54;
            color: #fff;
            font-size: 14px;
            font-family: 微软雅黑;
            cursor: pointer;
        }

            input[type=button]:hover {
                opacity: 0.8;
            }

        .bind-notice-msg {
            width: 770px;
            padding: 10px 15px;
            border: 1px solid #f60;
            font-family: 微软雅黑;
            font-size: 16px;
            color: #0094ff;
            margin-bottom: 20px;
            text-indent: 32px;
        }

        .content-wrap {
            width: 100%;
            padding: 20px;
        }

            .content-wrap span {
                display: table-cell;
                padding-right: 15px;
            }

        .content-row {
            line-height: 45px;
        }

        .bindAlipay-title {
            width: 780px;
            height: 35px;
            line-height: 35px;
            font-family: 微软雅黑;
            font-size: 18px;
            color: #fff;
            background-color: #0094ff;
            padding-left: 20px;
        }

        .bindAlipay-content {
            width: 798px;
            border: 1px solid #808080;
        }

        .bindAlipayInfo {
            margin-top: 15px;
        }

        .notice-title {
            width: 120px;
            text-align: right;
            font-family: 微软雅黑;
            font-size: 14px;
            color: #808080;
            letter-spacing: 3px;
        }

        .notice-msg {
            font-size: 12px;
            font-family: 微软雅黑;
            color: #f00;
        }

        .btnReset {
            background-color: #0094ff !important;
        }

        .ErrBorder {
            border-color: #f00 !important;
        }

        #txtCmfCode {
            width: 120px;
        }

        .img_validata {
            width: 97px;
            height: 40px;
            display: inline-block !important;
            cursor: pointer;
            vertical-align: middle;
            padding-top: 5px;
        }

            .img_validata img {
                width: 80px;
                height: 35px;
            }
    </style>
</head>
<body>
    <div class="wf_all">
        <input type="hidden" id="hidIsModifyBank" value="N" />
        <input type="hidden" id="hidIsModifyAlipay" value="N" />
        <div id="divLoginInfo">
            <%=msBsc.WebUi.Code.QtHtmlGet.GetHeaderLoginInfo() %>
        </div>
        <div class="main-container">
            <div class="tourist-content">
                <div class="sidebar-scroll noborder">
                    <%=msBsc.WebUi.Code.QtHtmlGet.GetTouristMenuHtml() %>
                </div>
                <div class="main-Info">
                    <div class="tnavigation">
                        <a href="#" class="nav">账户中心</a>&gt;
			
                        <a href="#" class="nav-on">支付验证</a>
                    </div>
                    <hr />
                    <div class="content-wrap">
                        <div class="bind-notice-msg">
                        为了保证您的财产安全，请输入正确的支付密码进行身份验证。
                    </div>

                    <div class="bindAlipayInfo">
                        <div class="bindAlipay-title">验证支付密码</div>
                        <div class="bindAlipay-content">
                            <div class="content-row">
                                <span class="notice-title">支付密码:</span>
                                <span class="cust-input">
                                    <input type="password" id="pwdUserPayPwd" value="" placeholder="请输入支付密码" />
                                </span>
                                <span class="notice-msg notice-msg-aliaccount"></span>
                            </div>
                            <div class="content-row">
                                <span class="notice-title">验证码:</span>
                                <span class="cust-input">
                                    <input type="text" id="txtCmfCode" value="" placeholder="请输入验证码" />
                                    <span id="imgValidata" class="img_validata"></span>
                                </span>
                                <span class="notice-msg notice-msg-validcode"></span>
                            </div>

                            <div class="content-row">
                                <span class="notice-title"></span>
                                <span class="cust-input">
                                    <input type="button" id="submitPayPwd" value="确认提交" />
                                    <input type="button" class="btnReset" id="resetPayPwd" value="重置内容" />
                                </span>
                            </div>
                        </div>
                    </div>
                    </div>
                </div>
            </div>
        </div>
        <!--start JS引用-->
        <script src="/jqPlugin/js/jquery-1.8.3.min.js"></script>
        
        <script src="/jqPlugin/js/jBase.js"></script>
        <script src="/jqPlugin/js/jBPage.js"></script>
        <script src="/jqPlugin/js/laytpl.js"></script>
        <script src="/themes/wStyle1/js/comm/VerifyJs.js"></script>

        <script src="/jqPlugin/SelectSimu/js/SelectSimu.js"></script>
        <script src="/themes/wStyle1/js/comm/jsLayout.js"></script>
        <script type="text/javascript">
            function ResetBindInfo() {
                $("#resetPayPwd").click(function () {
                    $("#pwdUserPayPwd").val("");
                    $("#txtCmfCode").val("");
                    ShowSuccessMsg("pwdUserPayPwd", "notice-msg-aliaccount")
                })
            }
            ResetBindInfo();

            $(function () {
                jQuery.getValidateImg('imgValidata');

                $("#submitPayPwd").click(function () {
                    SetPayPwdInfo();
                })

                $("input").keyup(function () {
                    ShowSuccessMsg($(this).attr("id"), "notice-msg")
                })
            })

            function SetPayPwdInfo() {
                $("#submitPayPwd").attr("disabled", "disabled");
                $("#submitPayPwd").val("正在验证...");
                var userPayPwd = $("#pwdUserPayPwd").val();
                if (IsNull(userPayPwd)) {
                    ShowErrMsg("pwdUserPayPwd", "notice-msg-aliaccount", "支付密码不能为空");
                    return;
                }

                if (userPayPwd.length < 6 || userPayPwd.length > 16) {
                    ShowErrMsg("pwdUserPayPwd", "notice-msg-aliaccount", "支付密码必须在6~16位之间");
                    return;
                }

                var validCode = $("#txtCmfCode").val();
                if (IsNull(validCode) || validCode.length != 4) {
                    ShowErrMsg("txtCmfCode", "notice-msg-validcode", "验证码错误");
                    return;
                }


                var oparm = new jsonRow();
                oparm.AddCell("ACTION", "CmfPayPwd");
                oparm.AddCell("userPayPwd", userPayPwd);
                oparm.AddCell("validCode", validCode);
                ajaxComm(oparm, null, function () {
                    $("#submitPayPwd").val("确认提交");
                    $("#submitPayPwd").removeAttr("disabled");
                });
            }

            function ShowErrMsg(ErrSourceId, MsgClass, MsgStr) {
                $("#" + ErrSourceId).addClass("ErrBorder")
                $("." + MsgClass).text("*" + MsgStr)
                $("#submitPayPwd").val("确认提交");
                $("#submitPayPwd").removeAttr("disabled");
                $(".img_validata img").click();
            }

            function ShowSuccessMsg(SuccessSourceId, MsgClass) {
                $("." + MsgClass).text("")
                $("#" + SuccessSourceId).removeClass("ErrBorder")

            }

            function TurnToReturnUrl() {
                var return_url = GetQueryStr("ReturnUrl");
                if (IsNull(return_url)) {
                    window.location.href = "/wb_TouristInfo.htm";
                } else {
                    window.location.href = return_url;
                }
            }
        </script>
        <%=msBsc.WebUi.Code.QtHtmlGet.GetFloorHtml() %>
    </div>
</body>
</html>
